﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharpSoda.Message
{
    public class BusinessMessageHelper
    {
        public static void CopyHeaderInfo(BusinessMessage src, BusinessMessage dst)
        {
            dst.Head.BusinessName = src.Head.BusinessName;
            dst.Head.ObjectName = src.Head.ObjectName;
            dst.Head.UserName = src.Head.UserName;
            dst.Head.Organization = src.Head.Organization;
            dst.Head.Token = src.Head.Token;
        }
        public static void CopyProperties(BusinessMessage src, BusinessMessage dst, List<string> exclude = null)
        {
            List<string> excludedNames = exclude;
            if (excludedNames == null) excludedNames = new List<string>() { "MessageName" };
            JsonHelper.CopyProperties<BusinessMessage>(src, dst, excludedNames);
        }
    }
}
